﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations; 

namespace Addressbook
{
    public class Address
    {
        //[Key]
        public int id { get; private set; }
        public string Street { get; private set; }
        public string Postcode { get; private set; }
        //[ForeignKey("Person")]
        //public int PersonId { get; set; }

        //not explicit neccessary 
        private Address() {}

        public Address(string street, string postcode)
        {
            Street = street;
            Postcode = postcode;
        }

        public override string ToString()
        {
            return string.Format("Street: {1}, Postcode: {2}", Street, Postcode);
        }
    }
}
